| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | /** |
||
| 14 | onKeyup: function(e) { |
||
| 15 | var query = this.$input.val().toLowerCase(), |
||
| 16 | $matches; |
||
| 17 | |||
| 18 | // The user's search query is longer than 1 character |
||
| 19 | if(query.length > 1) { |
||
| 20 | |||
| 21 | $matches = this.find(query); |
||
| 22 | |||
| 23 | this.$fields.hide(); |
||
| 24 | $matches.show(); |
||
| 25 | |||
| 26 | // Textual user feedback |
||
| 27 | $('#settings-search-results').text($matches.length ? $matches.length+' settings found' : 'Nothing found'); |
||
| 28 | } |
||
| 29 | |||
| 30 | // The user's search query is not longer than 1 character |
||
| 31 | else { |
||
| 32 | this.$fields.show(); |
||
| 33 | $('#settings-search-results').text(''); |
||
| 34 | } |
||
| 35 | }, |
||
| 36 | find: function(query) { |
||
| 53 | }; |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.